package com.softa.service.system;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.softa.bean.DataGridModel;
import com.softa.bean.Tree;
import com.softa.dao.model.SysResource;


/**
* @ClassName: ResourceService
* @Description: TODO
* @author yangl
* @date 2015-6-3 下午1:09:51
*
 */
public interface ResourceService {


	String createResource(SysResource resource);
	String updateResource(SysResource resource);
    void deleteResource(Long resourceId);

    SysResource findOne(Long resourceId);
    List<SysResource> findAll();

    /**
     * 得到资源对应的权限字符串
     * @param resourceIds
     * @return
     */
    Set<String> findPermissions(Set<Long> resourceIds);

    /**
     * 根据用户权限得到菜单
     * @param permissions
     * @return
     */
    List<SysResource> findMenus(Set<String> permissions);
    
    Map<String,Object> queryResourceByParam(DataGridModel dataGrid);
    
    List<Tree> ajaxResourceTree();
    
    List<Tree> findMenuResourceTree(String username);

    Set<String> findAllPermissions();
}
